home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / AIncludes / Power.a < prev    next >
Encoding:
Text File  |  1998-02-12  |  28.5 KB  |  1,125 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        Power.a
  3. ;
  4. ;    Contains:    Power Manager Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Release:    Universal Interfaces 3.1
  8. ;
  9. ;    Copyright:    © 1990-1998 by Apple Computer, Inc.  All rights reserved
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__POWER__') = 'UNDEFINED' THEN
  19. __POWER__ SET 1
  20.  
  21.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  22.     include 'MacTypes.a'
  23.     ENDIF
  24.     IF &TYPE('__MIXEDMODE__') = 'UNDEFINED' THEN
  25.     include 'MixedMode.a'
  26.     ENDIF
  27.  
  28.  
  29.                                                             ; Bit positions for ModemByte 
  30. modemOnBit                        EQU        0
  31. ringWakeUpBit                    EQU        2
  32. modemInstalledBit                EQU        3
  33. ringDetectBit                    EQU        4
  34. modemOnHookBit                    EQU        5
  35.  
  36.                                                             ; masks for ModemByte 
  37. modemOnMask                        EQU        $01
  38. ringWakeUpMask                    EQU        $04
  39. modemInstalledMask                EQU        $08
  40. ringDetectMask                    EQU        $10
  41. modemOnHookMask                    EQU        $20
  42.  
  43.                                                             ; bit positions for BatteryByte 
  44. chargerConnBit                    EQU        0
  45. hiChargeBit                        EQU        1
  46. chargeOverFlowBit                EQU        2
  47. batteryDeadBit                    EQU        3
  48. batteryLowBit                    EQU        4
  49. connChangedBit                    EQU        5
  50.  
  51.                                                             ; masks for BatteryByte 
  52. chargerConnMask                    EQU        $01
  53. hiChargeMask                    EQU        $02
  54. chargeOverFlowMask                EQU        $04
  55. batteryDeadMask                    EQU        $08
  56. batteryLowMask                    EQU        $10
  57. connChangedMask                    EQU        $20
  58.  
  59.                                                             ; bit positions for SoundMixerByte 
  60. MediaBaySndEnBit                EQU        0
  61. PCISndEnBit                        EQU        1
  62. ZVSndEnBit                        EQU        2
  63. PCCardSndEnBit                    EQU        3
  64.  
  65.                                                             ; masks for SoundMixerByte 
  66. MediaBaySndEnMask                EQU        $01
  67. PCISndEnMask                    EQU        $02
  68. ZVSndEnMask                        EQU        $04
  69. PCCardSndEnMask                    EQU        $08
  70.  
  71.                                                             ; commands to SleepQRec sleepQProc 
  72. sleepRequest                    EQU        1
  73. sleepDemand                        EQU        2
  74. sleepWakeUp                        EQU        3
  75. sleepRevoke                        EQU        4
  76. sleepUnlock                        EQU        4
  77. sleepDeny                        EQU        5
  78. sleepNow                        EQU        6
  79. dozeDemand                        EQU        7
  80. dozeWakeUp                        EQU        8
  81. dozeRequest                        EQU        9
  82.  
  83.                                                             ; SleepQRec.sleepQFlags 
  84. noCalls                            EQU        1
  85. noRequest                        EQU        2
  86. slpQType                        EQU        16
  87. sleepQType                        EQU        16
  88. ;  bits in bitfield returned by PMFeatures 
  89.  
  90. hasWakeupTimer                    EQU        0                    ; 1=wakeup timer is supported                                
  91. hasSharedModemPort                EQU        1                    ; 1=modem port shared by SCC and internal modem            
  92. hasProcessorCycling                EQU        2                    ; 1=processor cycling is supported                            
  93. mustProcessorCycle                EQU        3                    ; 1=processor cycling should not be turned off                
  94. hasReducedSpeed                    EQU        4                    ; 1=processor can be started up at reduced speed            
  95. dynamicSpeedChange                EQU        5                    ; 1=processor speed can be switched dynamically            
  96. hasSCSIDiskMode                    EQU        6                    ; 1=SCSI Disk Mode is supported                            
  97. canGetBatteryTime                EQU        7                    ; 1=battery time can be calculated                            
  98. canWakeupOnRing                    EQU        8                    ; 1=can wakeup when the modem detects a ring                
  99. hasDimmingSupport                EQU        9                    ; 1=has dimming support built in (DPMS standby by default)    
  100. hasStartupTimer                    EQU        10                    ; 1=startup timer is supported                                
  101. hasChargeNotification            EQU        11                    ; 1=client can determine of charge connect status change notifications available 
  102. hasDimSuspendSupport            EQU        12                    ; 1=supports dimming LCD and CRT to DPMS suspend state        
  103. ;  bits in bitfield returned by GetIntModemInfo and set by SetIntModemState 
  104.  
  105. hasInternalModem                EQU        0                    ; 1=internal modem installed                        
  106. intModemRingDetect                EQU        1                    ; 1=internal modem has detected a ring                
  107. intModemOffHook                    EQU        2                    ; 1=internal modem is off hook                        
  108. intModemRingWakeEnb                EQU        3                    ; 1=wakeup on ring is enabled                        
  109. extModemSelected                EQU        4                    ; 1=external modem selected                        
  110. modemSetBit                        EQU        15                    ; 1=set bit, 0=clear bit (SetIntModemState)        
  111. ;  bits in BatteryInfo.flags                                     
  112. ;  ("chargerConnected" doesn't mean the charger is plugged in)    
  113.  
  114. batteryInstalled                EQU        7                    ; 1=battery is currently connected                    
  115. batteryCharging                    EQU        6                    ; 1=battery is being charged                        
  116. chargerConnected                EQU        5                    ; 1=charger is connected to the PowerBook            
  117.  
  118. HDPwrQType                        EQU        $4844                ; 'HD' hard disk spindown queue element type        
  119. PMgrStateQType                    EQU        $504D                ; 'PM' Power Manager state queue element type        
  120. ;  client notification bits in PMgrQueueElement.pmNotifyBits 
  121.  
  122. pmSleepTimeoutChanged            EQU        0
  123. pmSleepEnableChanged            EQU        1
  124. pmHardDiskTimeoutChanged        EQU        2
  125. pmHardDiskSpindownChanged        EQU        3
  126. pmDimmingTimeoutChanged            EQU        4
  127. pmDimmingEnableChanged            EQU        5
  128. pmDiskModeAddressChanged        EQU        6
  129. pmProcessorCyclingChanged        EQU        7
  130. pmProcessorSpeedChanged            EQU        8
  131. pmWakeupTimerChanged            EQU        9
  132. pmStartupTimerChanged            EQU        10
  133. pmHardDiskPowerRemovedbyUser    EQU        11
  134. pmChargeStatusChanged            EQU        12
  135. pmPowerLevelChanged                EQU        13
  136. ;  System Activity Selectors 
  137.  
  138. OverallAct                        EQU        0                    ; general type of activity                            
  139. UsrActivity                        EQU        1                    ; user specific type of activity                    
  140. NetActivity                        EQU        2                    ; network specific activity                        
  141. HDActivity                        EQU        3                    ; Hard Drive activity                                
  142. ;  Storage Media sleep mode defines 
  143.  
  144. kMediaModeOn                    EQU        0                    ; Media active (Drive spinning and at full power)    
  145. kMediaModeStandBy                EQU        1                    ; Media standby (not implemented)    
  146. kMediaModeSuspend                EQU        2                    ; Media Idle (not implemented)    
  147. kMediaModeOff                    EQU        3                    ; Media Sleep (Drive not spinning and at min power, max recovery time)    
  148.  
  149. kMediaPowerCSCode                EQU        70
  150.  
  151. ;  definitions for HDQueueElement.hdFlags    
  152.  
  153. kHDQueuePostBit                    EQU        0                    ; 1 = call this routine on the second pass        
  154. kHDQueuePostMask                EQU        $01
  155. ActivityInfo            RECORD 0
  156. ActivityType             ds.w    1                ; offset: $0 (0)        ;  Type of activity to be fetched.  Same as UpdateSystemActivity Selectors 
  157. ActivityTime             ds.l    1                ; offset: $2 (2)        ;  Time of last activity (in ticks) of specified type. 
  158. sizeof                     EQU *                    ; size:   $6 (6)
  159.                         ENDR
  160. ;  information returned by GetScaledBatteryInfo 
  161. BatteryInfo                RECORD 0
  162. flags                     ds.b    1                ; offset: $0 (0)        ;  misc flags (see below)                            
  163. warningLevel             ds.b    1                ; offset: $1 (1)        ;  scaled warning level (0-255)                        
  164. reserved                 ds.b    1                ; offset: $2 (2)        ;  reserved for internal use                        
  165. batteryLevel             ds.b    1                ; offset: $3 (3)        ;  scaled battery level (0-255)                        
  166. sizeof                     EQU *                    ; size:   $4 (4)
  167.                         ENDR
  168. ; typedef SInt8                         ModemByte
  169.  
  170. ; typedef SInt8                         BatteryByte
  171.  
  172. ; typedef SInt8                         SoundMixerByte
  173.  
  174. ; typedef long                             PMResultCode
  175.  
  176.  
  177.  
  178. ; typedef SleepQRec *                    SleepQRecPtr
  179.  
  180.  
  181.  
  182.  
  183.  
  184. SleepQRec                RECORD 0
  185. sleepQLink                 ds.l    1                ; offset: $0 (0)        ;  pointer to next queue element                
  186. sleepQType                 ds.w    1                ; offset: $4 (4)        ;  queue element type (must be SleepQType)        
  187. sleepQProc                 ds.l    1                ; offset: $6 (6)        ;  pointer to sleep universal proc ptr            
  188. sleepQFlags                 ds.w    1                ; offset: $A (10)        ;  flags                                        
  189. sizeof                     EQU *                    ; size:   $C (12)
  190.                         ENDR
  191. HDQueueElement            RECORD 0
  192. hdQLink                     ds.l    1                ; offset: $0 (0)        ;  pointer to next queue element                
  193. hdQType                     ds.w    1                ; offset: $4 (4)        ;  queue element type (must be HDPwrQType)        
  194. hdFlags                     ds.w    1                ; offset: $6 (6)        ;  miscellaneous flags                            
  195. hdProc                     ds.l    1                ; offset: $8 (8)        ;  pointer to routine to call                    
  196. hdUser                     ds.l    1                ; offset: $C (12)        ;  user-defined (variable storage, etc.)        
  197. sizeof                     EQU *                    ; size:   $10 (16)
  198.                         ENDR
  199. PMgrQueueElement        RECORD 0
  200. pmQLink                     ds.l    1                ; offset: $0 (0)        ;  pointer to next queue element                
  201. pmQType                     ds.w    1                ; offset: $4 (4)        ;  queue element type (must be PMgrStateQType)    
  202. pmFlags                     ds.w    1                ; offset: $6 (6)        ;  miscellaneous flags                            
  203. pmNotifyBits             ds.l    1                ; offset: $8 (8)        ;  bitmap of which changes to be notified for    
  204. pmProc                     ds.l    1                ; offset: $C (12)        ;  pointer to routine to call                    
  205. pmUser                     ds.l    1                ; offset: $10 (16)        ;  user-defined (variable storage, etc.)        
  206. sizeof                     EQU *                    ; size:   $14 (20)
  207.                         ENDR
  208.  
  209. BatteryTimeRec            RECORD 0
  210. expectedBatteryTime         ds.l    1                ; offset: $0 (0)        ;  estimated battery time remaining (seconds)    
  211. minimumBatteryTime         ds.l    1                ; offset: $4 (4)        ;  minimum battery time remaining (seconds)        
  212. maximumBatteryTime         ds.l    1                ; offset: $8 (8)        ;  maximum battery time remaining (seconds)        
  213. timeUntilCharged         ds.l    1                ; offset: $C (12)        ;  time until battery is fully charged (seconds)
  214. sizeof                     EQU *                    ; size:   $10 (16)
  215.                         ENDR
  216.  
  217. WakeupTime                RECORD 0
  218. wakeTime                 ds.l    1                ; offset: $0 (0)        ;  wakeup time (same format as current time)        
  219. wakeEnabled                 ds.b    1                ; offset: $4 (4)        ;  1=enable wakeup timer, 0=disable wakeup timer    
  220. filler                     ds.b    1                ; offset: $5 (5)
  221. sizeof                     EQU *                    ; size:   $6 (6)
  222.                         ENDR
  223.  
  224. StartupTime                RECORD 0
  225. startTime                 ds.l    1                ; offset: $0 (0)        ;  startup time (same format as current time)        
  226. startEnabled             ds.b    1                ; offset: $4 (4)        ;  1=enable startup timer, 0=disable startup timer    
  227. filler                     ds.b    1                ; offset: $5 (5)
  228. sizeof                     EQU *                    ; size:   $6 (6)
  229.                         ENDR
  230. ;
  231. ; pascal OSErr DisableWUTime(void )
  232. ;
  233.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  234.         IMPORT_CFM_FUNCTION DisableWUTime
  235.     ENDIF
  236.  
  237. ;
  238. ; pascal OSErr SetWUTime(long WUTime)
  239. ;
  240.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  241.         IMPORT_CFM_FUNCTION SetWUTime
  242.     ENDIF
  243.  
  244. ;
  245. ; pascal OSErr GetWUTime(long *WUTime, Byte *WUFlag)
  246. ;
  247.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  248.         IMPORT_CFM_FUNCTION GetWUTime
  249.     ENDIF
  250.  
  251. ;
  252. ; pascal OSErr BatteryStatus(Byte *Status, Byte *Power)
  253. ;
  254.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  255.         IMPORT_CFM_FUNCTION BatteryStatus
  256.     ENDIF
  257.  
  258. ;
  259. ; pascal OSErr ModemStatus(Byte *Status)
  260. ;
  261.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  262.         IMPORT_CFM_FUNCTION ModemStatus
  263.     ENDIF
  264.  
  265. ;
  266. ; pascal long IdleUpdate(void )
  267. ;
  268.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  269.         ; returns:
  270.         ;    long            <= D0
  271.         _IdleUpdate:    OPWORD    $A285
  272.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  273.         IMPORT_CFM_FUNCTION IdleUpdate
  274.     ENDIF
  275.  
  276. ;
  277. ; pascal long GetCPUSpeed(void )
  278. ;
  279.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  280.         ; returns:
  281.         ;    long            <= D0
  282.         Macro
  283.         _GetCPUSpeed
  284.             moveq               #-1,D0
  285.             dc.w                $A485
  286.         EndM
  287.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  288.         IMPORT_CFM_FUNCTION GetCPUSpeed
  289.     ENDIF
  290.  
  291. ;
  292. ; pascal void EnableIdle(void )
  293. ;
  294.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  295.         Macro
  296.         _EnableIdle
  297.             moveq               #0,D0
  298.             dc.w                $A485
  299.         EndM
  300.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  301.         IMPORT_CFM_FUNCTION EnableIdle
  302.     ENDIF
  303.  
  304. ;
  305. ; pascal void DisableIdle(void )
  306. ;
  307.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  308.         Macro
  309.         _DisableIdle
  310.             moveq               #1,D0
  311.             dc.w                $A485
  312.         EndM
  313.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  314.         IMPORT_CFM_FUNCTION DisableIdle
  315.     ENDIF
  316.  
  317. ;
  318. ; pascal void SleepQInstall(SleepQRecPtr qRecPtr)
  319. ;
  320.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  321.         ; parameters:
  322.         ;    qRecPtr         => A0
  323.         _SleepQInstall:    OPWORD    $A28A
  324.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  325.         IMPORT_CFM_FUNCTION SleepQInstall
  326.     ENDIF
  327.  
  328. ;
  329. ; pascal void SleepQRemove(SleepQRecPtr qRecPtr)
  330. ;
  331.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  332.         ; parameters:
  333.         ;    qRecPtr         => A0
  334.         _SleepQRemove:    OPWORD    $A48A
  335.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  336.         IMPORT_CFM_FUNCTION SleepQRemove
  337.     ENDIF
  338.  
  339. ;
  340. ; pascal void AOn(void )
  341. ;
  342.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  343.         Macro
  344.         _AOn
  345.             moveq               #4,D0
  346.             dc.w                $A685
  347.         EndM
  348.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  349.         IMPORT_CFM_FUNCTION AOn
  350.     ENDIF
  351.  
  352. ;
  353. ; pascal void AOnIgnoreModem(void )
  354. ;
  355.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  356.         Macro
  357.         _AOnIgnoreModem
  358.             moveq               #5,D0
  359.             dc.w                $A685
  360.         EndM
  361.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  362.         IMPORT_CFM_FUNCTION AOnIgnoreModem
  363.     ENDIF
  364.  
  365. ;
  366. ; pascal void BOn(void )
  367. ;
  368.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  369.         Macro
  370.         _BOn
  371.             moveq               #0,D0
  372.             dc.w                $A685
  373.         EndM
  374.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  375.         IMPORT_CFM_FUNCTION BOn
  376.     ENDIF
  377.  
  378. ;
  379. ; pascal void AOff(void )
  380. ;
  381.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  382.         Macro
  383.         _AOff
  384.             moveq               #-124,D0
  385.             dc.w                $A685
  386.         EndM
  387.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  388.         IMPORT_CFM_FUNCTION AOff
  389.     ENDIF
  390.  
  391. ;
  392. ; pascal void BOff(void )
  393. ;
  394.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  395.         Macro
  396.         _BOff
  397.             moveq               #-128,D0
  398.             dc.w                $A685
  399.         EndM
  400.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  401.         IMPORT_CFM_FUNCTION BOff
  402.     ENDIF
  403.  
  404.  
  405. ;  Public Power Management API (NEW!) 
  406.  
  407. ;
  408. ; pascal short PMSelectorCount(void )
  409. ;
  410.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  411.         ; returns:
  412.         ;    short           <= D0
  413.         Macro
  414.         _PMSelectorCount
  415.             moveq               #0,D0
  416.             dc.w                $A09E
  417.         EndM
  418.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  419.         IMPORT_CFM_FUNCTION PMSelectorCount
  420.     ENDIF
  421.  
  422. ;
  423. ; pascal unsigned long PMFeatures(void )
  424. ;
  425.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  426.         ; returns:
  427.         ;    unsigned long   <= D0
  428.         Macro
  429.         _PMFeatures
  430.             moveq               #1,D0
  431.             dc.w                $A09E
  432.         EndM
  433.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  434.         IMPORT_CFM_FUNCTION PMFeatures
  435.     ENDIF
  436.  
  437. ;
  438. ; pascal UInt8 GetSleepTimeout(void )
  439. ;
  440.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  441.         ; returns:
  442.         ;    UInt8           <= D0
  443.         Macro
  444.         _GetSleepTimeout
  445.             moveq               #2,D0
  446.             dc.w                $A09E
  447.         EndM
  448.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  449.         IMPORT_CFM_FUNCTION GetSleepTimeout
  450.     ENDIF
  451.  
  452. ;
  453. ; pascal void SetSleepTimeout(UInt8 timeout)
  454. ;
  455.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  456.         ; parameters:
  457.         ;    timeout         => D0
  458.         Macro
  459.         _SetSleepTimeout
  460.             swap                D0
  461.             move.w              #$0003,D0
  462.             dc.w                $A09E
  463.         EndM
  464.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  465.         IMPORT_CFM_FUNCTION SetSleepTimeout
  466.     ENDIF
  467.  
  468. ;
  469. ; pascal UInt8 GetHardDiskTimeout(void )
  470. ;
  471.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  472.         ; returns:
  473.         ;    UInt8           <= D0
  474.         Macro
  475.         _GetHardDiskTimeout
  476.             moveq               #4,D0
  477.             dc.w                $A09E
  478.         EndM
  479.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  480.         IMPORT_CFM_FUNCTION GetHardDiskTimeout
  481.     ENDIF
  482.  
  483. ;
  484. ; pascal void SetHardDiskTimeout(UInt8 timeout)
  485. ;
  486.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  487.         ; parameters:
  488.         ;    timeout         => D0
  489.         Macro
  490.         _SetHardDiskTimeout
  491.             swap                D0
  492.             move.w              #$0005,D0
  493.             dc.w                $A09E
  494.         EndM
  495.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  496.         IMPORT_CFM_FUNCTION SetHardDiskTimeout
  497.     ENDIF
  498.  
  499. ;
  500. ; pascal Boolean HardDiskPowered(void )
  501. ;
  502.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  503.         ; returns:
  504.         ;    Boolean         <= D0
  505.         Macro
  506.         _HardDiskPowered
  507.             moveq               #6,D0
  508.             dc.w                $A09E
  509.         EndM
  510.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  511.         IMPORT_CFM_FUNCTION HardDiskPowered
  512.     ENDIF
  513.  
  514. ;
  515. ; pascal void SpinDownHardDisk(void )
  516. ;
  517.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  518.         Macro
  519.         _SpinDownHardDisk
  520.             moveq               #7,D0
  521.             dc.w                $A09E
  522.         EndM
  523.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  524.         IMPORT_CFM_FUNCTION SpinDownHardDisk
  525.     ENDIF
  526.  
  527. ;
  528. ; pascal Boolean IsSpindownDisabled(void )
  529. ;
  530.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  531.         ; returns:
  532.         ;    Boolean         <= D0
  533.         Macro
  534.         _IsSpindownDisabled
  535.             moveq               #8,D0
  536.             dc.w                $A09E
  537.         EndM
  538.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  539.         IMPORT_CFM_FUNCTION IsSpindownDisabled
  540.     ENDIF
  541.  
  542. ;
  543. ; pascal void SetSpindownDisable(Boolean setDisable)
  544. ;
  545.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  546.         ; parameters:
  547.         ;    setDisable      => D0
  548.         Macro
  549.         _SetSpindownDisable
  550.             swap                D0
  551.             move.w              #$0009,D0
  552.             dc.w                $A09E
  553.         EndM
  554.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  555.         IMPORT_CFM_FUNCTION SetSpindownDisable
  556.     ENDIF
  557.  
  558. ;
  559. ; pascal OSErr HardDiskQInstall(HDQueueElement *theElement)
  560. ;
  561.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  562.         ; parameters:
  563.         ;    theElement      => A0
  564.         ; returns:
  565.         ;    OSErr           <= D0
  566.         Macro
  567.         _HardDiskQInstall
  568.             moveq               #10,D0
  569.             dc.w                $A09E
  570.         EndM
  571.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  572.         IMPORT_CFM_FUNCTION HardDiskQInstall
  573.     ENDIF
  574.  
  575. ;
  576. ; pascal OSErr HardDiskQRemove(HDQueueElement *theElement)
  577. ;
  578.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  579.         ; parameters:
  580.         ;    theElement      => A0
  581.         ; returns:
  582.         ;    OSErr           <= D0
  583.         Macro
  584.         _HardDiskQRemove
  585.             moveq               #11,D0
  586.             dc.w                $A09E
  587.         EndM
  588.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  589.         IMPORT_CFM_FUNCTION HardDiskQRemove
  590.     ENDIF
  591.  
  592. ;
  593. ; pascal void GetScaledBatteryInfo(short whichBattery, BatteryInfo *theInfo)
  594. ;
  595.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  596.         ; parameters:
  597.         ;    whichBatterytheInfo=> D0
  598.         ;    theInfo         => A0
  599.         Macro
  600.         _GetScaledBatteryInfo
  601.             swap                D0
  602.             move.w              #$000C,D0
  603.             dc.w                $A09E
  604.             move.l              D0,(A0)
  605.         EndM
  606.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  607.         IMPORT_CFM_FUNCTION GetScaledBatteryInfo
  608.     ENDIF
  609.  
  610. ;
  611. ; pascal void AutoSleepControl(Boolean enableSleep)
  612. ;
  613.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  614.         ; parameters:
  615.         ;    enableSleep     => D0
  616.         Macro
  617.         _AutoSleepControl
  618.             swap                D0
  619.             move.w              #$000D,D0
  620.             dc.w                $A09E
  621.         EndM
  622.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  623.         IMPORT_CFM_FUNCTION AutoSleepControl
  624.     ENDIF
  625.  
  626. ;
  627. ; pascal unsigned long GetIntModemInfo(void )
  628. ;
  629.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  630.         ; returns:
  631.         ;    unsigned long   <= D0
  632.         Macro
  633.         _GetIntModemInfo
  634.             moveq               #14,D0
  635.             dc.w                $A09E
  636.         EndM
  637.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  638.         IMPORT_CFM_FUNCTION GetIntModemInfo
  639.     ENDIF
  640.  
  641. ;
  642. ; pascal void SetIntModemState(short theState)
  643. ;
  644.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  645.         ; parameters:
  646.         ;    theState        => D0
  647.         Macro
  648.         _SetIntModemState
  649.             swap                D0
  650.             move.w              #$000F,D0
  651.             dc.w                $A09E
  652.         EndM
  653.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  654.         IMPORT_CFM_FUNCTION SetIntModemState
  655.     ENDIF
  656.  
  657. ;
  658. ; pascal short MaximumProcessorSpeed(void )
  659. ;
  660.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  661.         ; returns:
  662.         ;    short           <= D0
  663.         Macro
  664.         _MaximumProcessorSpeed
  665.             moveq               #16,D0
  666.             dc.w                $A09E
  667.         EndM
  668.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  669.         IMPORT_CFM_FUNCTION MaximumProcessorSpeed
  670.     ENDIF
  671.  
  672. ;
  673. ; pascal short CurrentProcessorSpeed(void )
  674. ;
  675.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  676.         ; returns:
  677.         ;    short           <= D0
  678.         Macro
  679.         _CurrentProcessorSpeed
  680.             moveq               #17,D0
  681.             dc.w                $A09E
  682.         EndM
  683.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  684.         IMPORT_CFM_FUNCTION CurrentProcessorSpeed
  685.     ENDIF
  686.  
  687. ;
  688. ; pascal Boolean FullProcessorSpeed(void )
  689. ;
  690.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  691.         ; returns:
  692.         ;    Boolean         <= D0
  693.         Macro
  694.         _FullProcessorSpeed
  695.             moveq               #18,D0
  696.             dc.w                $A09E
  697.         EndM
  698.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  699.         IMPORT_CFM_FUNCTION FullProcessorSpeed
  700.     ENDIF
  701.  
  702. ;
  703. ; pascal Boolean SetProcessorSpeed(Boolean fullSpeed)
  704. ;
  705.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  706.         ; parameters:
  707.         ;    fullSpeed       => D0
  708.         ; returns:
  709.         ;    Boolean         <= D0
  710.         Macro
  711.         _SetProcessorSpeed
  712.             swap                D0
  713.             move.w              #$0013,D0
  714.             dc.w                $A09E
  715.         EndM
  716.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  717.         IMPORT_CFM_FUNCTION SetProcessorSpeed
  718.     ENDIF
  719.  
  720. ;
  721. ; pascal short GetSCSIDiskModeAddress(void )
  722. ;
  723.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  724.         ; returns:
  725.         ;    short           <= D0
  726.         Macro
  727.         _GetSCSIDiskModeAddress
  728.             moveq               #20,D0
  729.             dc.w                $A09E
  730.         EndM
  731.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  732.         IMPORT_CFM_FUNCTION GetSCSIDiskModeAddress
  733.     ENDIF
  734.  
  735. ;
  736. ; pascal void SetSCSIDiskModeAddress(short scsiAddress)
  737. ;
  738.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  739.         ; parameters:
  740.         ;    scsiAddress     => D0
  741.         Macro
  742.         _SetSCSIDiskModeAddress
  743.             swap                D0
  744.             move.w              #$0015,D0
  745.             dc.w                $A09E
  746.         EndM
  747.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  748.         IMPORT_CFM_FUNCTION SetSCSIDiskModeAddress
  749.     ENDIF
  750.  
  751. ;
  752. ; pascal void GetWakeupTimer(WakeupTime *theTime)
  753. ;
  754.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  755.         ; parameters:
  756.         ;    theTime         => A0
  757.         Macro
  758.         _GetWakeupTimer
  759.             moveq               #22,D0
  760.             dc.w                $A09E
  761.         EndM
  762.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  763.         IMPORT_CFM_FUNCTION GetWakeupTimer
  764.     ENDIF
  765.  
  766. ;
  767. ; pascal void SetWakeupTimer(WakeupTime *theTime)
  768. ;
  769.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  770.         ; parameters:
  771.         ;    theTime         => A0
  772.         Macro
  773.         _SetWakeupTimer
  774.             moveq               #23,D0
  775.             dc.w                $A09E
  776.         EndM
  777.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  778.         IMPORT_CFM_FUNCTION SetWakeupTimer
  779.     ENDIF
  780.  
  781. ;
  782. ; pascal Boolean IsProcessorCyclingEnabled(void )
  783. ;
  784.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  785.         ; returns:
  786.         ;    Boolean         <= D0
  787.         Macro
  788.         _IsProcessorCyclingEnabled
  789.             moveq               #24,D0
  790.             dc.w                $A09E
  791.         EndM
  792.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  793.         IMPORT_CFM_FUNCTION IsProcessorCyclingEnabled
  794.     ENDIF
  795.  
  796. ;
  797. ; pascal void EnableProcessorCycling(Boolean enable)
  798. ;
  799.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  800.         ; parameters:
  801.         ;    enable          => D0
  802.         Macro
  803.         _EnableProcessorCycling
  804.             swap                D0
  805.             move.w              #$0019,D0
  806.             dc.w                $A09E
  807.         EndM
  808.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  809.         IMPORT_CFM_FUNCTION EnableProcessorCycling
  810.     ENDIF
  811.  
  812. ;
  813. ; pascal short BatteryCount(void )
  814. ;
  815.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  816.         ; returns:
  817.         ;    short           <= D0
  818.         Macro
  819.         _BatteryCount
  820.             moveq               #26,D0
  821.             dc.w                $A09E
  822.         EndM
  823.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  824.         IMPORT_CFM_FUNCTION BatteryCount
  825.     ENDIF
  826.  
  827. ;
  828. ; pascal Fixed GetBatteryVoltage(short whichBattery)
  829. ;
  830.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  831.         ; parameters:
  832.         ;    whichBattery    => D0
  833.         ; returns:
  834.         ;    Fixed           <= D0
  835.         Macro
  836.         _GetBatteryVoltage
  837.             swap                D0
  838.             move.w              #$001B,D0
  839.             dc.w                $A09E
  840.         EndM
  841.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  842.         IMPORT_CFM_FUNCTION GetBatteryVoltage
  843.     ENDIF
  844.  
  845. ;
  846. ; pascal void GetBatteryTimes(short whichBattery, BatteryTimeRec *theTimes)
  847. ;
  848.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  849.         ; parameters:
  850.         ;    whichBatterytheTimes=> D0
  851.         ;    theTimes        => A0
  852.         Macro
  853.         _GetBatteryTimes
  854.             swap                D0
  855.             move.w              #$001C,D0
  856.             dc.w                $A09E
  857.         EndM
  858.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  859.         IMPORT_CFM_FUNCTION GetBatteryTimes
  860.     ENDIF
  861.  
  862. ;
  863. ; pascal UInt8 GetDimmingTimeout(void )
  864. ;
  865.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  866.         ; returns:
  867.         ;    UInt8           <= D0
  868.         Macro
  869.         _GetDimmingTimeout
  870.             moveq               #29,D0
  871.             dc.w                $A09E
  872.         EndM
  873.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  874.         IMPORT_CFM_FUNCTION GetDimmingTimeout
  875.     ENDIF
  876.  
  877. ;
  878. ; pascal void SetDimmingTimeout(UInt8 timeout)
  879. ;
  880.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  881.         ; parameters:
  882.         ;    timeout         => D0
  883.         Macro
  884.         _SetDimmingTimeout
  885.             swap                D0
  886.             move.w              #$001E,D0
  887.             dc.w                $A09E
  888.         EndM
  889.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  890.         IMPORT_CFM_FUNCTION SetDimmingTimeout
  891.     ENDIF
  892.  
  893. ;
  894. ; pascal void DimmingControl(Boolean enableSleep)
  895. ;
  896.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  897.         ; parameters:
  898.         ;    enableSleep     => D0
  899.         Macro
  900.         _DimmingControl
  901.             swap                D0
  902.             move.w              #$001F,D0
  903.             dc.w                $A09E
  904.         EndM
  905.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  906.         IMPORT_CFM_FUNCTION DimmingControl
  907.     ENDIF
  908.  
  909. ;
  910. ; pascal Boolean IsDimmingControlDisabled(void )
  911. ;
  912.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  913.         ; returns:
  914.         ;    Boolean         <= D0
  915.         Macro
  916.         _IsDimmingControlDisabled
  917.             moveq               #32,D0
  918.             dc.w                $A09E
  919.         EndM
  920.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  921.         IMPORT_CFM_FUNCTION IsDimmingControlDisabled
  922.     ENDIF
  923.  
  924. ;
  925. ; pascal Boolean IsAutoSlpControlDisabled(void )
  926. ;
  927.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  928.         ; returns:
  929.         ;    Boolean         <= D0
  930.         Macro
  931.         _IsAutoSlpControlDisabled
  932.             moveq               #33,D0
  933.             dc.w                $A09E
  934.         EndM
  935.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  936.         IMPORT_CFM_FUNCTION IsAutoSlpControlDisabled
  937.     ENDIF
  938.  
  939. ;
  940. ; pascal OSErr PMgrStateQInstall(PMgrQueueElement *theElement)
  941. ;
  942.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  943.         ; parameters:
  944.         ;    theElement      => A0
  945.         ; returns:
  946.         ;    OSErr           <= D0
  947.         Macro
  948.         _PMgrStateQInstall
  949.             moveq               #34,D0
  950.             dc.w                $A09E
  951.         EndM
  952.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  953.         IMPORT_CFM_FUNCTION PMgrStateQInstall
  954.     ENDIF
  955.  
  956. ;
  957. ; pascal OSErr PMgrStateQRemove(PMgrQueueElement *theElement)
  958. ;
  959.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  960.         ; parameters:
  961.         ;    theElement      => A0
  962.         ; returns:
  963.         ;    OSErr           <= D0
  964.         Macro
  965.         _PMgrStateQRemove
  966.             moveq               #35,D0
  967.             dc.w                $A09E
  968.         EndM
  969.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  970.         IMPORT_CFM_FUNCTION PMgrStateQRemove
  971.     ENDIF
  972.  
  973. ;
  974. ; pascal OSErr UpdateSystemActivity(UInt8 activity)
  975. ;
  976.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  977.         ; parameters:
  978.         ;    activity        => D0
  979.         ; returns:
  980.         ;    OSErr           <= D0
  981.         Macro
  982.         _UpdateSystemActivity
  983.             swap                D0
  984.             move.w              #$0024,D0
  985.             dc.w                $A09E
  986.         EndM
  987.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  988.         IMPORT_CFM_FUNCTION UpdateSystemActivity
  989.     ENDIF
  990.  
  991. ;
  992. ; pascal OSErr DelaySystemIdle(void )
  993. ;
  994.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  995.         ; returns:
  996.         ;    OSErr           <= D0
  997.         Macro
  998.         _DelaySystemIdle
  999.             moveq               #37,D0
  1000.             dc.w                $A09E
  1001.         EndM
  1002.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1003.         IMPORT_CFM_FUNCTION DelaySystemIdle
  1004.     ENDIF
  1005.  
  1006. ;
  1007. ; pascal OSErr GetStartupTimer(StartupTime *theTime)
  1008. ;
  1009.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1010.         ; parameters:
  1011.         ;    theTime         => A0
  1012.         ; returns:
  1013.         ;    OSErr           <= D0
  1014.         Macro
  1015.         _GetStartupTimer
  1016.             moveq               #38,D0
  1017.             dc.w                $A09E
  1018.         EndM
  1019.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1020.         IMPORT_CFM_FUNCTION GetStartupTimer
  1021.     ENDIF
  1022.  
  1023. ;
  1024. ; pascal OSErr SetStartupTimer(StartupTime *theTime)
  1025. ;
  1026.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1027.         ; parameters:
  1028.         ;    theTime         => A0
  1029.         ; returns:
  1030.         ;    OSErr           <= D0
  1031.         Macro
  1032.         _SetStartupTimer
  1033.             moveq               #39,D0
  1034.             dc.w                $A09E
  1035.         EndM
  1036.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1037.         IMPORT_CFM_FUNCTION SetStartupTimer
  1038.     ENDIF
  1039.  
  1040. ;
  1041. ; pascal OSErr GetLastActivity(ActivityInfo *theActivity)
  1042. ;
  1043.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1044.         ; parameters:
  1045.         ;    theActivity     => A0
  1046.         ; returns:
  1047.         ;    OSErr           <= D0
  1048.         Macro
  1049.         _GetLastActivity
  1050.             moveq               #40,D0
  1051.             dc.w                $A09E
  1052.         EndM
  1053.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1054.         IMPORT_CFM_FUNCTION GetLastActivity
  1055.     ENDIF
  1056.  
  1057. ;
  1058. ; pascal OSErr GetSoundMixerState(SoundMixerByte *theSoundMixerByte)
  1059. ;
  1060.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1061.         ; parameters:
  1062.         ;    theSoundMixerByte=> A0
  1063.         ; returns:
  1064.         ;    OSErr           <= D0
  1065.         Macro
  1066.         _GetSoundMixerState
  1067.             moveq               #41,D0
  1068.             dc.w                $A09E
  1069.         EndM
  1070.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1071.         IMPORT_CFM_FUNCTION GetSoundMixerState
  1072.     ENDIF
  1073.  
  1074. ;
  1075. ; pascal OSErr SetSoundMixerState(SoundMixerByte *theSoundMixerByte)
  1076. ;
  1077.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1078.         ; parameters:
  1079.         ;    theSoundMixerByte=> A0
  1080.         ; returns:
  1081.         ;    OSErr           <= D0
  1082.         Macro
  1083.         _SetSoundMixerState
  1084.             moveq               #42,D0
  1085.             dc.w                $A09E
  1086.         EndM
  1087.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1088.         IMPORT_CFM_FUNCTION SetSoundMixerState
  1089.     ENDIF
  1090.  
  1091. ;
  1092. ; pascal Boolean GetDimSuspendState(void )
  1093. ;
  1094.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1095.         ; returns:
  1096.         ;    Boolean         <= D0
  1097.         Macro
  1098.         _GetDimSuspendState
  1099.             moveq               #43,D0
  1100.             dc.w                $A09E
  1101.         EndM
  1102.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1103.         IMPORT_CFM_FUNCTION GetDimSuspendState
  1104.     ENDIF
  1105.  
  1106. ;
  1107. ; pascal void SetDimSuspendState(Boolean dimSuspendState)
  1108. ;
  1109.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1110.         ; parameters:
  1111.         ;    dimSuspendState => D0
  1112.         Macro
  1113.         _SetDimSuspendState
  1114.             swap                D0
  1115.             move.w              #$002C,D0
  1116.             dc.w                $A09E
  1117.         EndM
  1118.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1119.         IMPORT_CFM_FUNCTION SetDimSuspendState
  1120.     ENDIF
  1121.  
  1122.  
  1123.     ENDIF ; __POWER__ 
  1124.  
  1125.